<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>案例-循环结构语句-for</title>
</head>

<body>
  <script>
    //利用for循环拿到1~100的数字
    for (var i = 1; i <= 100; i++) {

      //判断是3的倍数
      if (i % 3 === 0) {
        console.log(i)
      }
    }

  </script>
</body>

</html>